import rtconfig
from building import *

# get current directory
cwd = GetCurrentDir()

# The set of source files associated with this SConscript file.

src = Split('''
CMSIS/GD/GD32F4xx/Source/system_gd32f4xx.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_gpio.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_rcu.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_exti.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_misc.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_syscfg.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_usart.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_i2c.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_spi.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_can.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_crc.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_ctc.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_dbg.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_dci.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_fmc.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_ipa.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_iref.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_enet.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_exmc.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_timer.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_tli.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_trng.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_adc.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_dac.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_pmu.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_wwdgt.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_fwdgt.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_sdio.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_dma.c
''')

path = [
    cwd + '/CMSIS/GD/GD32F4xx/Include',
    cwd + '/CMSIS',
    cwd + '/GD32F4xx_standard_peripheral/Include',]

CPPDEFINES = ['USE_STDPERIPH_DRIVER']

group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)

Return('group')
